package com.zelin.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * ------------------------------
 * 功能：学生实体类
 * 作者：WF
 * 微信：hbxfwf13590332912
 * 创建时间：2021/9/14-15:06
 * ------------------------------
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "student")
public class Student {
    @Id                                //设置主键
    @KeySql(useGeneratedKeys = true)   //设置主键自增
    private Integer sid;
    private String sname;
    private String sex;
    private Integer age;
    private String addr;
    private Integer cid;
    @Transient   //不参与序列化(因为数据库中没有此字段)
    private String cname;
}
